#ifndef ESDA_common_h
#define ESDA_common_h

#define	__STDC_LIMIT_MACROS 1
#include <stdint.h>

#include <string>
#include <sstream>

#include <iomanip>
#include <iostream>
#include <fstream>
#include <stdexcept>

using namespace std;

#define VERBOSITY_DEBUG 2
#define VERBOSITY_TEST  1
#define VERBOSITY_PROD  0

#ifndef VERBOSITY
#define VERBOSITY VERBOSITY_DEBUG
#endif

#define ERROR(error) DEBUG(" -- " << error); throw runtime_error("A fatal error has occurred");

#if VERBOSITY >= VERBOSITY_DEBUG
	#define ASSERT(x) assert(x)
	#define DEBUG(x)  cout << x << endl
#else
	#define ASSERT(x) /**/
	#define DEBUG(x)  /**/
#endif

#define TIME(label, x) long long int label = Timestamp::createAsInt(); x; DEBUG("time : " << (Timestamp::createAsInt() - label) << " ms");

#endif
